﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WinnerCMS.Data.Mapping
{
    public partial class IPBlackListMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<WinnerCMS.Model.IPBlackList>
    {
        public IPBlackListMap()
        {
            // table
            //ToTable("CMS_IPBlackList");

            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(t => t.IPStart)
                .IsUnicode(false)
                .IsFixedLength()
                .HasMaxLength(16)
                .IsRequired();
            Property(t => t.IPEnd)
                .IsUnicode(false)
                .IsFixedLength()
                .HasMaxLength(16)
                .IsRequired();
            Property(t => t.SectorStart)
                
                .IsRequired();
            Property(t => t.SectorEnd)
                
                .IsRequired();
            Property(t => t.AdminName)
                
                .HasMaxLength(50)
                .IsRequired();
            Property(t => t.CreateTime)
                
                .IsRequired();
            Property(t => t.UpDateTime)
                
                .IsRequired();

            // Relationships

            //InitializeMapping();
        }
    }
}

